#region System
using System;
using System.Collections.Generic;
using CF.Framework.Engine;
using CF.Framework.Engine.Controls;
using CF.Framework.Engine.Drawing;
using CF.Framework.Engine.Effects;
using CF.Framework.Engine.Misc;
using CF.Framework.Engine.Screens;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
#endregion

namespace CF.Framework.Engine.Controls
{
	public abstract class ContextContainer : Control
	{
		public Texture2D Context { get; set; }

		public override int Width
		{
			get
			{
				if (base.Width <= 0
					&& this.Context != null)
				{
					return this.Context.Width;
				}

				return base.Width;
			}
			set
			{
				base.Width = value;
			}
		}

		public override int Height
		{
			get
			{
				if (base.Height <= 0
					&& this.Context != null)
				{
					return this.Context.Height;
				}

				return base.Height;
			}
			set
			{
				base.Height = value;
			}
		}
	}
}
